package com.zatech.cgnci.project.controller;


import com.zatech.cgnci.project.base.enums.ResponseCodeEnum;
import com.zatech.cgnci.project.base.exception.GlobalException;
import com.zatech.cgnci.project.base.utils.VerifyUtils;
import com.zatech.cgnci.project.dto.CgnciClaimAlertInfoDTO;
import com.zatech.cgnci.project.service.CgnciClaimAlertInfoService;
import com.zatech.cgnci.project.vo.CgnciClaimAlertInfoVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 类 CgnciAlertInfoController 的实现描述：风险信息，提示信息
 * </p>
 *
 * @author za-xiaojingjie
 * @version 2025/1/7 14:21
 * @since 2025/1/7 14:21
 */
@RestController
@RequestMapping("/api/alertInfo")
@RequiredArgsConstructor
@Api(tags = "风险提示-消息提示api接口文档")
public class CgnciAlertInfoController {
    
  
     public final CgnciClaimAlertInfoService cgnciClaimAlertInfoService;
    
    @GetMapping("/getList")
    @ApiOperation(value = "查询业务号对应的提示")
    public List<CgnciClaimAlertInfoVO> getByCaseNo(@RequestParam("businessNo") String businessNo,
                                                   @RequestParam("businessScene") String businessScene){
       if(VerifyUtils.isEmpty(businessNo)|| VerifyUtils.isEmpty(businessScene)){
           throw new GlobalException(ResponseCodeEnum.HTTP_REQUEST_SERVICE_ERROR,"业务号或业务场景不能为空");
       }
       return cgnciClaimAlertInfoService.getByBusinessNo(businessNo, businessScene);
    }
    
    
}
